openunicycleworldfandomcom_de-20200215-history
Vorlage:Dokumentation/doc
This is the Vorlage. For most of the instructions about how and when to use this Vorlage, see Wikipedia:Vorlage Dokumentation. This Vorlage displays a green doc box like you are seeing now, and automatically loads the content from a /doc Unterseite. It can also load the content from other places if instructed to. This Vorlage is intended for documenting Vorlagen and other pages which are transcluded onto other pages. It can be used in Vorlage space and most other namespaces. Use of this Vorlage allows Vorlagen to be protected where necessary, while allowing anyone to edit the Dokumentation and Kategorien. Usage Normally this Vorlage is used without any parameters, placed at the bottom of the Vorlage or page being documented, within : Then this Vorlage automatically loads the content from the /doc Unterseite of the Vorlage it is used on. This Vorlage can also load the content from any other page. Like this: Note that when loading the Dokumentation from another page than the local /doc page it becomes tricky to handle the Kategorien and interwiki links. The content can also be fed directly as text. Like this: When the parameter is used, the doc box normally does not show the edit purge links in the top right corner. Note that if the /doc page exists a link to it is still shown in the link box below the doc box. Parameter and the parameter can also be combined, like this: }} Then the pagename fed as parameter 1 is used for the edit purge links and for the /doc link in the link box below the doc box. But the content parameter is used for the content shown in the doc box. The above code means that the content is transcluded as parameters}}. In this example a parameter is also fed to the /doc page being loaded. Best practice The code should be added at the bottom of the Vorlage code, with no space before (which would cause extra space on pages where the Vorlage is used). Kategorien and interwiki links that apply to the Vorlage itself should be added to the bottom of the /doc Unterseite, inside tags. For more complex cases, see Wikipedia:Vorlage Dokumentation#Kategorien and interwiki links. If the Dokumentation page contains or tags as part of the visible Dokumentation text, replace the "<" with "<". The heading When in the Vorlage namespace, this Vorlage shows this heading: : Vorlage Dokumentation In most other namespaces, such as "Wikipedia:", it shows this heading: :Dokumentation But when on File (image) pages it shows this heading: :Summary The heading parameter can be used to set the heading to something else. Like this: : If the heading parameter is empty but defined, no heading is shown and no edit purge links are shown. Like this: : The heading-style parameter can be fed optional CSS values. Without quotation marks " " but with the ending semicolons ;. For example: :heading-style = color: red; font-size: 150%; The link box Below the big doc box is a small link box that shows some meta-data about the Dokumentation. The link box shows different things depending on what parameters are fed to this Vorlage, and in which namespace it is used. In some cases the link box is not shown at all. To hide the link box, add the parameter . You can also insert customised text in the link box, by defining the parameter. For example: Automatic functions If the Dokumentation page does not exist, the create link includes a preload page so that clicking it will pre-fill the edit form with the basic Dokumentation page format. Preload text is also used for the /sandbox and /testcases (create) links. When this Vorlage is on a protected Vorlage page it now automatically adds which shows the grey or red padlock in the top right corner. So no need to manually add to Vorlagen that use . When this Vorlage is on a /sandbox Unterseite it automatically adds the . If that sandbox is not a Unterseite of the live Vorlage, then the parameter can be used to correctly link back to that Vorlage. Subject namespaces vs. talk namespaces Terminology: Subject namespaces are the opposite of talk namespaces. For instance "Vorlage:" is the subject space of "Vorlage talk:". This Vorlage is usually placed in a subject namespace, within tags. But in some cases this Vorlage needs to be on the talk page: * For preload pages (usually in Vorlage or Wikipedia namespaces), since they cannot use . See for instance, Vorlage talk:AfC preload and Vorlage talk:RfD Unterseite starter. Such talk pages can be marked with . * In the Mediawiki namespace, since often does not work in system messagesm and since the Mediawiki namespace needs to be kept clean for performance reasons. When placed on talk pages, this Vorlage usually is placed near the top of the page and without tags. The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki Unterseite feature enabled: Main, File, Mediawiki and Kategorie. (But currently we only show the /sandbox and /testcases links from User, User talk, Vorlage and Vorlage talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces. This Vorlage automatically points its create links for the /doc, /sandbox and /testcases to the right namespace. Technische Details This Vorlage calls and which in turn call and . The /start box (and /end box) hold most of the code, while this Vorlage and /start box2 (and /end box2) do parameter preprocessing. The preload page for the /doc create link is Vorlage:Dokumentation/preload, but in File namespace it is Vorlage:Dokumentation/preload-filespace. The preload pages for the /sandbox and /testcases create links are Vorlage:Dokumentation/preload-sandbox and Vorlage:Dokumentation/preload-testcases. For more technical details see the talk page. Siehe auch * – Placed on Vorlagen and other pages to document them. * – Used at the top of /doc Unterseites to explain what they are and to link back to the page they document. * – Variant specifically for barnstar Vorlagen * Wikipedia:Vorlage Dokumentation – The how-to guide about Vorlage Dokumentation. * Wikipedia:Vorlage test cases – How to use /sandbox and /testcases Unterseites and more about Vorlage testing. Kategorie:Vorlage Dokumentation Kategorie:Wikipedia formatting and function Vorlagen